package com.tust.service.impl;

import com.tust.dao.TeacherDao;
import com.tust.domain.Teacher;
import com.tust.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class TeacherServiceImpl implements TeacherService {
    @Autowired
    private TeacherDao teacherDao;

    @Override
    public int insertTeacher(Teacher teacher) {
        return teacherDao.insertTeacher(teacher);
    }

    @Override
    public int deleteTeacher(String teacherNum) {
        return teacherDao.deleteTeacher(teacherNum);
    }

    @Override
    public int updateTeacher(String oldTeacherNum, Teacher teacher) {
        return teacherDao.updateTeacher(oldTeacherNum, teacher);
    }

    @Override
    public List<Teacher> selectTeacherByTeacherNum(String teacherNum) {
        return teacherDao.selectTeacherByTeacherNum(teacherNum);
    }

    @Override
    public List<Teacher> selectTeacherByTeacherName(String teacherName) {
        return teacherDao.selectTeacherByTeacherName(teacherName);
    }

    @Override
    public List<Teacher> selectTeacherByTeacherSex(String teacherSex) {
        return teacherDao.selectTeacherByTeacherSex(teacherSex);
    }

    @Override
    public List<Teacher> selectTeacherByTeacherTitle(String teacherTitle) {
        return teacherDao.selectTeacherByTeacherTitle(teacherTitle);
    }

    @Override
    public List<Teacher> selectTeacherByTeacherEducation(String teacherEducation) {
        return teacherDao.selectTeacherByTeacherEducation(teacherEducation);
    }

    @Override
    public List<Teacher> selectTeacherByTeacherBirthday(String teacherBirthday) {
        return teacherDao.selectTeacherByTeacherBirthday(teacherBirthday);
    }

    @Override
    public List<Teacher> selectTeacherByTeacherDepartment(String teacherDepartment) {
        return teacherDao.selectTeacherByTeacherDepartment(teacherDepartment);
    }

    @Override
    public List<Teacher> selectTeacherAll() {
        return teacherDao.selectTeacherAll();
    }
}
